import { AUDIT_STATUS_LIST } from '@/const/type';
export const tableOption = () => {
  return {
    ...window.$crudMixins.tableOptions,
    addBtn: false,
    editBtn: false,
    delBtn: false,
    menuWidth: 100,
    viewBtn: false,
    detail: true,
    group: [
      {
        label: '个人信息',
        prop: 'group1',
        column: [
          {
            label: '姓名',
            search: true,
            prop: 'name',
          },
          {
            label: '用户昵称',
            prop: 'nickName',
          },
          {
            label: '用户编号',
            prop: 'code',
          },
          {
            label: '年龄',
            prop: 'age',
          },
          {
            // 性别 : 0 - 未知的性别1 - 男性2 - 女性9 - 未说明的性别
            label: '性别',
            prop: 'sex',
            type: 'select',
            dicData: [
              { label: '未知的性别', value: '0' },
              { label: '男性', value: '1' },
              { label: '女性', value: '2' },
              { label: '未说明的性别', value: '9' },
            ],
          },
          {
            type: 'input',
            label: '联系电话',
            prop: 'phone',
            search: true,
            width: 160,
            rules: [
              {
                min: 11,
                max: 11,
                required: true,
                message: '长度在 11 个字符',
                trigger: 'blur',
              },
            ],
          },
          {
            label: '家庭地址',
            prop: 'address',
          },
          {
            label: '申请时间',
            prop: 'applyTime',
            type: 'datetime',
            width: 160,
            format: 'yyyy-MM-dd HH:mm:ss',
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            search: true,
            searchRange: true,
          },
        ],
      },
      {
        label: '审核信息',
        prop: 'group2',
        // labelWidth: 0,
        column: [
          {
            label: '审核状态',
            prop: 'examineState',
            type: 'select',
            search: true,
            dicData: AUDIT_STATUS_LIST,
          },
          {
            prop: 'examineRemark',
            type: 'textarea',
            label: '审核备注',
            minRows: 7,
            span: 24,
          },
        ],
      },
    ],
  };
};
